<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>bi数据分析管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript" src="${ctxStatic }/highcharts/highcharts.js"></script>
	<script type="text/javascript" src="${ctxStatic }/highcharts/modules/exporting.js"></script>
	<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script type="text/javascript">
	$(function () {
		Highcharts.setOptions({
			lang: {
				contextButtonTitle: "导出菜单",
				downloadJPEG: "下载 JPEG 图片",
				downloadPDF: "下载 PDF 文件",
				downloadPNG: "下载 PNG 图片",
				downloadSVG: "下载 SVG 矢量图片",
				printChart: "图表打印",
				weekdays: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
				months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] ,
				resetZoom: "返回缩放",
				resetZoomTitle: "缩放比1:1"
			}
		});
		
		
		$('#container').highcharts({
	        chart: {
	            plotBackgroundColor: null,
	            plotBorderWidth: null,
	            plotShadow: false
	        },credits: {
	        	enabled: false
	        },
	        title: {
	            text: '二维码渠道分析'
	        }, tooltip: {
	        	 formatter: function() {
	                 return '<b>'+ this.point.name +'</b>: '+ Highcharts.numberFormat(this.percentage, 1) +'% ('+
	                              Highcharts.numberFormat(this.y, 0, ',') +' 个)';
	              }
	        },
	        plotOptions: {
	            pie: {
	                allowPointSelect: true,
	                cursor: 'pointer',
	                dataLabels: {
	                    enabled: true,
	                    color: '#000000',
	                    connectorColor: '#000000',
	                    format: '<b>{point.name}</b>: {point.percentage:.1f} %'
	                }
	            }
	        },
	        series: [{
	            type: 'pie',
	            name: '二维码渠道人数',
	            data:${data}
	        }]
	    });
	});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li ><a href="${ctx}/bi/wechatMessage/">用户关注数分析</a></li>
		<li><a href="${ctx}/bi/wechatMessage/biWechatMemberList">会员注册分析</a></li>
		<li ><a href="${ctx}/bi/wechatMessage/memberMessage">会员性别分析</a></li>
		<li class="active"><a href="${ctx}/bi/wechatMessage/qrCodeSubscribeMessage">渠道关注分析</a></li>
		<li ><a href="${ctx}/bi/wechatMessage/qrCodeSubscribeMessageByDay">二维码渠道关注趋势分析</a></li>
		<li ><a href="${ctx}/bi/wechatMessage/wechatReceiveList">会员消息分析</a></li>
		<li ><a href="${ctx}/bi/wechatMessage/wechatMenuList">平台菜单点击分析</a></li>
		<li ><a href="${ctx}/bi/wechatMessage/wechatMenuViewList">平台菜单跳转链接分析</a></li>
		<li ><a href="${ctx}/bi/wechatMessage/biAliveMemberList">平台活跃人数分析分析</a></li>
	</ul>
	<form id="searchForm" action="${ctx}/bi/wechatMessage/qrCodeSubscribeMessage" method="post" class="breadcrumb form-search">
		<label>请选择月份：</label>
					<input id="d121" type="text" onfocus="WdatePicker({isShowWeek:true})" name="createTime"  value="${createTime }"/>
			<shiro:hasPermission name="sys:user:edit"><tags:treeselect id="sellerList" name="sellerIds" value="${advertisement.sellerIds}" checked="true"  labelName="sellerList.name"  labelValue="${advertisement.sellerNames}"
					title="平台商" url="/sys/user/allUserTreeData"/></shiro:hasPermission>
		<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"   "/>&nbsp;&nbsp;
	</form>
	<tags:message content="${message}"/>
	<c:if test="${message ne '当天没有关注的人，请查询其他日期'}">
	<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
	</c:if>
</body>
</html>
